﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH4.Shoppgin.Admin.DTO
{

    /*
     * 这个DTO的作用是添加产品的时候，把所需要的spu、sku、sku-image、spu-spec的信息一次性传进来
     * **/
    /// <summary>
    /// 产品添加的DTO
    /// </summary>
    public class ProductInputDto
    {
        #region SPU 信息
        public Guid BrandId { get; set; }
        public Guid CategoryId { get; set; }
        public string Description { get; set; }
        #endregion

        #region SKU信息
        public List<ProductSKUInputDto> Skus { get; set; }
        #endregion

        #region SPU Spec规格信息
        public List<ProductSPUSpecInputDto> Specs { get; set; }
        #endregion
    }

    /// <summary>
    /// 添加的时候，spu对应的sku信息
    /// </summary>
    public class ProductSKUInputDto
    {
        public decimal InPrice { get; set; }
        public decimal MarketPrice { get; set; }
        public decimal SalePrice { get; set; }
        public string Specs { get; set; }
        public int Stock { get; set; }

        //具体某个sku对应的多张图片
        public List<string> ImagePath { get; set; }
    }

    public class ProductSPUSpecInputDto
    {
        public string SpecName { get; set; }
        public string SpecValue { get; set; }
    }
}
